<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Authen_model extends CI_Model{
	function __construct()
    {
        // Call the Model constructor
        session_start();
        parent::__construct();
    }
	
	function stillLogin(){
		
		if($_SESSION['username'] == ""){
			return FALSE;
		}
		else{
			return TRUE;
		}

	}
	
	function checkLogin($username , $password){
		
		if(($username == 'admin')&&($password == 'admin')){
			
            //session_start();
			$_SESSION['username'] = $username;
			//die();
			return TRUE;
		} 
		
	}
		
}
?>
	